package com.example.demo.controller;


import com.example.demo.service.TestService;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Delete;
import org.springframework.web.bind.annotation.PathVariable;

import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;

@Slf4j
@Api(value = "脚手架-H5配置管理", protocols = "http", tags = "脚手架-H5配置管理")
public class testController {


    public static void main(String[] args) {
        System.out.printf("hello world ");
    }


    private TestService testService;

    @POST
    public void save(){

    }
    public void test08042(){
        System.out.println("自行测试-git");
    }

    @Delete("/{id}")
    public String deleUtil(@PathVariable Integer id){
        return testService.delUtil(id);
    }

    @PUT
    @Path("/")
    public void update(){

    }

    @GET
    @Path("/query")
    @ApiOperation
    public void queryById(Exception e,String entName){
        //errorHander
        String errmsg;
//        log.info("当前用户{}，具有印章：{}权限", entName, sealInfoList.get(i).getSealTitle());
        //如果e是空指针类型的异常，把错误信息置为null
        if(e instanceof NullPointerException){
            errmsg="null";
        }else {
            errmsg=e.getMessage();
        }
        //在命令行打印异常信息在程序中出错的位置及原因
        StackTraceElement[] stackTrace = e.getStackTrace();
    }

}
